/**
 *
 */
package model;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import util.ApplicationProperties;

/**
 * TODO COMMENT ME!
 * 
 * @author Marco
 */
public class Model {

    public List<Series> getAvailableSeriesVideoFolders() {
        File tempEpisodetitleRoot = ApplicationProperties.getSeriesRoot();
        File[] tempFolderList = tempEpisodetitleRoot.listFiles();
        List<Series> tempSeriesList = new ArrayList<Series>(
                tempFolderList.length);

        for (File tempSeriesFolder : tempFolderList) {
            tempSeriesList.add(new Series(tempEpisodetitleRoot,
                    tempSeriesFolder.getName()));
        }

        return tempSeriesList;
    }

    public List<Series> getAvailableEpisodeTitleFolders() {
        File tempEpisodetitleRoot = ApplicationProperties
                .getEpisodetitlesRoot();
        File[] tempFolderList = tempEpisodetitleRoot.listFiles();
        List<Series> tempSeriesList = new ArrayList<Series>(
                tempFolderList.length);

        for (File tempSeriesFolder : tempFolderList) {
            tempSeriesList.add(new Series(tempEpisodetitleRoot,
                    tempSeriesFolder.getName()));
        }

        return tempSeriesList;
    }
}
